-
Notifications
You must be signed in to change notification settings - Fork 5
ENH: Generalize iterators to accept bvals or uptake as kwargs
#238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: Generalize iterators to accept bvals or uptake as kwargs
#238
Conversation
08c29dc to
80de628
Compare
|
Partially addresses #230. It remains the question about the |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #238 +/- ##
==========================================
+ Coverage 76.08% 76.22% +0.13%
==========================================
Files 28 28
Lines 1777 1779 +2
Branches 187 182 -5
==========================================
+ Hits 1352 1356 +4
+ Misses 362 361 -1
+ Partials 63 62 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
80de628 to
87ca171
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd make it more generic, including size in it, and then have SIZE_KEYS be a priority list (a bit like it used to be).
Exception then would be raised if size cannot be inferred.
WDYT?
7ce8c9c to
d8b1e70
Compare
|
From #243 (comment)
Done in this PR.
Looks OK to me. Now, the should be and so on for the rest of the iterators. Will amend once we agree on that. |
d8b1e70 to
64492e2
Compare
Correct, that was the thinking. |
c271881 to
76f551e
Compare
Generalize iterators to accept `bvals` or `uptake` as keyword arguments. The previous implementation of the linear, random and centralsym iterators was only accepting `bvals`. This patch set allows these iterators to work with PET data through the `uptake` argument. Transition to keyword argument-only style. Adapt the doctests accordingly. Document the functions by explicitly assigning the docstring to the `__doc__` property of each function so that the `SIZE_KEYS_DOC` can be reused and to allow the examples be run by the doctring tests. Co-authored-by: Oscar Esteban <[email protected]>
76f551e to
a1310e6
Compare
Generalize iterators to accept
bvalsoruptakeas keyword arguments. The previous implementation of the linear, random and centralsym iterators was only acceptingbvals. This patch set allows these iterators to work with PET data through theuptakeargument.Transition to keyword argument-only style. Adapt the doctests accordingly.
Document the functions by explicitly assigning the docstring to the
__doc__property of each function so that theSIZE_KEYS_DOCcan be reused and to allow the examples be run by the doctring tests.